ci: add build, lint and bundle size check workflow#38
ci: add build, lint and bundle size check workflow#38Ri1tik wants to merge 3 commits intoAOSSIE-Org:mainfrom
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughA GitHub Actions CI workflow was added at Changes
Sequence Diagram(s)sequenceDiagram
participant PR as Pull Request
participant GH as GitHub Actions
participant Runner as Runner
participant NPM as npm Registry
participant Art as Artifact Storage
participant Checker as Bundle Size Check
PR->>GH: push / pull_request event
GH->>Runner: start Build job
GH->>Runner: start Lint job
GH->>Runner: start Bundle Size job (waits for artifact)
Runner->>Runner: checkout repo
Runner->>NPM: npm ci
Runner->>Runner: run build (tsc/vite)
Runner->>Art: upload `dist/` artifact
Art-->>Checker: artifact available
Checker->>Art: download `dist/`
Checker->>Checker: measure bundle size
Checker->>GH: post warning or success
Runner->>GH: Lint job posts results
Runner->>GH: Build job posts results and artifact metadata
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 72-82: Update the "Check bundle size" workflow step to emit a
GitHub Actions annotation and make the threshold configurable: read the bundle
size into BUNDLE_SIZE (as currently done), introduce an environment variable
BUNDLE_SIZE_THRESHOLD (default 500) for the threshold, and when BUNDLE_SIZE is
greater than BUNDLE_SIZE_THRESHOLD use the workflow command ::warning:: to
output the annotated warning (e.g., "::warning::Bundle size ${BUNDLE_SIZE}KB
exceeds ${BUNDLE_SIZE_THRESHOLD}KB threshold") instead of a plain echo; keep the
existing success message path unchanged and retain the "Check bundle size" step
name and BUNDLE_SIZE variable usage so the change is localized.
- Around line 1-8: The CI workflow named "CI" lacks concurrency control and job
timeouts; add a top-level concurrency section (e.g., concurrency: { group:
github.ref, cancel-in-progress: true }) to cancel redundant runs for the same
ref/PR, and add timeout-minutes: 10 (or another suitable value) to each job
definition so individual jobs cannot hang indefinitely—update the workflow "CI"
file to include these keys adjacent to the existing name/on sections and inside
each job block.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: c5fd49ed-8bd3-46aa-a7f3-5466aaf878ca
📒 Files selected for processing (1)
.github/workflows/ci.yml
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/ci.yml:
- Around line 79-88: The "Check bundle size" step currently uses `du -sk` which
reports allocated blocks; change the BUNDLE_SIZE calculation to sum actual file
bytes in the dist/ tree (e.g. use `find dist -type f -print0` piped to `xargs -0
stat --format=%s` and sum, or `find ... -print0 | xargs -0 wc -c`), assign that
result to BUNDLE_SIZE, and keep the existing threshold logic
(BUNDLE_SIZE_THRESHOLD, the echo/warning branches) so the comparison uses real
byte counts rather than filesystem allocation sizes.
- Around line 1-13: Add an explicit top-level permissions block to the workflow
to restrict the GITHUB_TOKEN to read-only repository contents: insert a
permissions: contents: read entry at the top-level of the CI workflow (the YAML
that defines name: CI and on: ...) so the workflow only grants read access
instead of inheriting broader repo defaults; ensure the permissions key is
aligned with the workflow root and not nested under jobs or steps.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: ae5d0449-9c74-429f-9bfd-20bb3ad321b9
📒 Files selected for processing (1)
.github/workflows/ci.yml
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Addressed Issues:
Fixes #37
Screenshots/Recordings:
No UI changes — CI workflow only.
Tested locally before opening this PR:
Build output:

Lint output:

No errors, no warnings
Additional Notes:
Checklist
We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact.
Summary by CodeRabbit